// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 新增班级 POST /api/class/addClass */
export async function addClassUsingPost(
  body: API.AddClassRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/class/addClass", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除班级 POST /api/class/deleteClass */
export async function deleteClassUsingPost(
  body: API.DeleteClassRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/class/deleteClass", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询所有班级信息 GET /api/class/listAll */
export async function listAllClassesUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListClassInfoVO_>("/api/class/listAll", {
    method: "GET",
    ...(options || {}),
  });
}

/** 根据辅导员ID查询班级信息 GET /api/class/listByCounselor */
export async function listClassesByCounselorUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listClassesByCounselorUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListClassInfoVO_>(
    "/api/class/listByCounselor",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 更新班级 POST /api/class/updateClass */
export async function updateClassUsingPost(
  body: API.UpdateClassRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/class/updateClass", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
